package oop1;

public class Person {

    /**
     *属性
     * 成员变量
     */
    private String perName;
    private int perAge;
    private  String perSex;

    //getter的行为方法的接口
    public String getPerName() {
        return perName;
    }

    public int getPerAge() {
        return perAge;
    }

    public String getPerSex() {
        return perSex;
    }

    //setter的行为方法的接口
    public void setPerName(String perName) {
        this.perName = perName;
    }

    public void setPerAge(int perAge) {
        this.perAge = perAge;
    }

    public void setPerSex(String perSex) {
        this.perSex = perSex;
    }

    /**
     * 行为
     * 方法
     */

    public  Person(){

        System.out.println("执行了父类Person中的默认的构造方法");
    }

    public Person(String perName, int perAge , String perSex){
        System.out.println("执行了父类Person中的三个参数的构造方法");
        this.perName= perName;
        this.perAge = perAge;
        this.perSex = perSex;
        System.out.println("姓名："+perName+"年龄："+perAge+"性别："+perSex+"学号：");

    }

    //行为方法
    public  void  doEating(){
        System.out.println("I am eating。。。。。。。。。。。");
    }

    public void  doSleeping(){
        System.out.println("I am sleeping...............");
    }
}
